Skip to content

Conversation

@dustymabe
Copy link
Member

Allow group write permissions on /usr/bin because in upstream project's CI we want to overwrite binaries for testing. The dir is owned by root:root and CI runs in openshift as a user that is a member of the root (GID: 0) group.

See coreos/coreos-installer#1716

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds group-write permissions to /usr/bin to facilitate testing in a CI environment. However, this change introduces a critical security vulnerability by allowing any process with root group privileges to modify system binaries, potentially leading to privilege escalation. My review includes a critical comment explaining the risks and suggesting a safer alternative, such as using a separate directory for test binaries and modifying the PATH.

build.sh Outdated
Comment on lines 115 to 120
# Allow group write permissions on /usr/bin because in upstream
# project's CI we want to overwrite binaries for testing. The dir is
# owned by root:root and CI runs in openshift as a user that is a
# member of the `root` (GID: 0) group.
# See https://github.com/coreos/coreos-installer/pull/1716
chmod g+w /usr/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

Granting group-write permissions to /usr/bin introduces a critical security vulnerability. Any process running with GID 0 (as is common in OpenShift for non-root users) can modify or replace any system binary in that directory. This could be exploited for privilege escalation if a compromised process replaces a commonly used executable (like ls, sudo, or curl) with a malicious version.

While this is for a CI environment, it's a dangerous practice that violates the principle of least privilege. A safer alternative for overriding binaries for testing would be:

  1. Create a separate directory (e.g., /opt/testing-bin).
  2. Grant write permissions to that directory.
  3. In your CI test environment, prepend this directory to the PATH environment variable (e.g., export PATH=/opt/testing-bin:$PATH).

This approach allows you to override binaries without altering the permissions of critical system directories.

dustymabe added a commit to dustymabe/coreos-installer that referenced this pull request Jan 9, 2026
We opened up the permissions when building the COSA container [1] so
this isn't necessary any longer with a few adjustments here.

[1] coreos/coreos-assembler#4410
@dustymabe
Copy link
Member Author

so here we are opening up permissions on /usr/bin which should suffice for coreos-installer, but I don't know about ostree:

https://github.com/ostreedev/ostree/blob/94baad63780a2f01f377bfc69803b4e210730531/.cci.jenkinsfile#L60-L63

@HuijingHei maybe we could be more targeted in what we copy over in ostree CI? What we're currently copying is quite exhaustive:

Details
[2026-01-08T22:11:06.745Z] + rsync -rlv installed/rootfs/ /
[2026-01-08T22:11:06.745Z] sending incremental file list
[2026-01-08T22:11:06.745Z] etc/grub.d/15_ostree -> /usr/libexec/libostree/grub2-15_ostree
[2026-01-08T22:11:06.745Z] usr/bin/ostree
[2026-01-08T22:11:06.745Z] usr/bin/rofiles-fuse
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-async-progress.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-autocleanups.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-blob-reader.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-bootconfig-parser.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-content-writer.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-core.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-deployment.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-diff.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-dummy-enumtypes.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-gpg-verify-result.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-kernel-args.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-mutable-tree.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-ref.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-remote.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-deprecated.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-file.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-finder-avahi.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-finder-config.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-finder-mount.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-finder-override.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-finder.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo-os.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-repo.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-sepolicy.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-sign-ed25519.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-sign.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-sysroot-upgrader.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-sysroot.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-types.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree-version.h
[2026-01-08T22:11:06.745Z] usr/include/ostree-1/ostree.h
[2026-01-08T22:11:06.745Z] usr/lib/ostree/ostree-prepare-root
[2026-01-08T22:11:06.745Z] usr/lib/ostree/ostree-remount
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system-generators/ostree-system-generator
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/ostree-boot-complete.service
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/ostree-finalize-staged-hold.service
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/ostree-finalize-staged.service
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/ostree-prepare-root.service
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/ostree-remount.service
[2026-01-08T22:11:06.745Z] usr/lib/systemd/system/[email protected]
[2026-01-08T22:11:06.745Z] usr/lib/tmpfiles.d/ostree-tmpfiles.conf
[2026-01-08T22:11:06.745Z] usr/lib64/libostree-1.la
[2026-01-08T22:11:06.745Z] usr/lib64/libostree-1.so -> libostree-1.so.1.0.0
[2026-01-08T22:11:06.745Z] usr/lib64/libostree-1.so.1.0.0
[2026-01-08T22:11:06.745Z] usr/lib64/girepository-1.0/OSTree-1.0.typelib
[2026-01-08T22:11:06.745Z] usr/lib64/pkgconfig/ostree-1.pc
[2026-01-08T22:11:06.745Z] usr/libexec/libostree/grub2-15_ostree
[2026-01-08T22:11:06.745Z] usr/share/bash-completion/completions/ostree
[2026-01-08T22:11:06.745Z] usr/share/gir-1.0/
[2026-01-08T22:11:06.745Z] usr/share/gir-1.0/OSTree-1.0.gir
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/annotation-glossary.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/home.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/index.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/left-insensitive.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/left.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-Core-repository-independent-functions.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-GPG-signature-verification-results.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-In-memory-modifiable-filesystem-tree.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-OstreeRepo.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-Progress-notification-system-for-asynchronous-operations.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-Root-partition-mount-point.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-SELinux-policy-management.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-Signature-management.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-Simple-upgrade-class.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-bootconfig-parser.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-chain-input-stream.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-checksum-input-stream.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-content-writer.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-deployment.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-diff.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-kernel-args.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-ref.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-remote.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-repo-file.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-repo-finder.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-repo-remote-finder.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree-ostree-version.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/ostree.devhelp2
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/reference.html
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/right-insensitive.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/right.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/style.css
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/up-insensitive.png
[2026-01-08T22:11:06.745Z] usr/share/gtk-doc/html/ostree/up.png
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-cleanup.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-config-diff.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-deploy.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-init-fs.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-instutil.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-lock-finalization.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-os-init.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-pin.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-post-copy.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-prepare-soft-reboot.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-set-default.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-set-origin.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-stateroot-init.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-status.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-switch.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-undeploy.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-unlock.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin-upgrade.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-admin.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-cat.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-checkout.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-checksum.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-commit.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-config.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-create-usb.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-diff.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-export.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-find-remotes.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-fsck.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-gpg-sign.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-init.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-log.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-ls.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-prepare-root.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-prune.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-pull-local.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-pull.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-refs.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-remote.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-reset.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-rev-parse.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-show.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-sign.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-static-delta.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree-summary.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/ostree.1
[2026-01-08T22:11:06.745Z] usr/share/man/man1/rofiles-fuse.1
[2026-01-08T22:11:06.745Z] usr/share/man/man5/ostree.repo-config.5
[2026-01-08T22:11:06.745Z] usr/share/man/man5/ostree.repo.5
[2026-01-08T22:11:06.745Z] usr/share/man/man8/[email protected]
[2026-01-08T22:11:06.745Z] usr/share/ostree/trusted.gpg.d/README-gpg
[2026-01-08T22:11:06.745Z] 
[2026-01-08T22:11:06.745Z] sent 5,297,917 bytes  received 2,664 bytes  10,601,162.00 bytes/sec
[2026-01-08T22:11:06.745Z] total size is 5,287,135  speedup is 1.00
[2026-01-08T22:11:06.745Z] + rsync -rlv installed/tests/ /
[2026-01-08T22:11:06.745Z] sending incremental file list
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/install-wrappers.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/data-shared/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/data-shared/libinsttest.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/data-shared/libtest-core.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/composefs::itest_composefs
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/config.ign
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/destructive::itest_transactionality
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/data/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive-rs/data/ostree-test
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/auto-prune.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/basic-misc.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/boot-automount.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/deployment-lint
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/finalization.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/itest-bare-root.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/itest-deploy-selinux.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/itest-label-selinux.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/kargs-edit-in-place.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/mount-propagation.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/overlay-initrds.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/root-transient-ro.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/soft-reboot.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/staged-delay.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/staged-deploy.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/state-overlay.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/unlock-transient.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/var-mount.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/data/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/data/libinsttest.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/destructive/data/libtest-core.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive-rs/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive-rs/ostree-test
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-alt-sysroot.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-bare-unit.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-bare-user-root.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-payload-link.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-pull-space.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-pull.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/itest-remotes.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/libtest-core.sh -> ../data-shared/libtest-core.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/data/
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/data/libinsttest.sh
[2026-01-08T22:11:06.745Z] usr/lib/coreos-assembler/tests/kola/ostree/nondestructive/data/libtest-core.sh

dustymabe added a commit to dustymabe/coreos-installer that referenced this pull request Jan 9, 2026
We opened up the permissions when building the COSA container [1] so
this isn't necessary any longer with a few adjustments here.

[1] coreos/coreos-assembler#4410
dustymabe added a commit to dustymabe/coreos-installer that referenced this pull request Jan 9, 2026
We opened up the permissions when building the COSA container [1] so
this isn't necessary any longer with a few adjustments here.

[1] coreos/coreos-assembler#4410
@HuijingHei
Copy link
Member

so here we are opening up permissions on /usr/bin which should suffice for coreos-installer, but I don't know about ostree:

https://github.com/ostreedev/ostree/blob/94baad63780a2f01f377bfc69803b4e210730531/.cci.jenkinsfile#L60-L63

@HuijingHei maybe we could be more targeted in what we copy over in ostree CI? What we're currently copying is quite exhaustive:

Agree with you, I have no better workaround for this, how about chmod g+w /usr?

@dustymabe
Copy link
Member Author

@travier WDYT?

build.sh Outdated
# owned by root:root and CI runs in openshift as a user that is a
# member of the `root` (GID: 0) group.
# See https://github.com/coreos/coreos-installer/pull/1716
chmod g+w /usr/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
chmod g+w /usr/bin
chmod -R g+w /usr/bin

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For coreos-installer, /usr/bin is enough, but for ostree, maybe need more like /usr/lib{,64} or /usr/share?

dustymabe added a commit to dustymabe/ostree that referenced this pull request Jan 16, 2026
With some changes made upstream to COSA [1] we shouldn't need to
runAsUser: 0 any longer.

[1] coreos/coreos-assembler#4410
@dustymabe dustymabe changed the title build.sh: allow group write on /usr/bin build.sh: allow group write on /usr/* Jan 16, 2026
HuijingHei
HuijingHei previously approved these changes Jan 16, 2026
Copy link
Member

@HuijingHei HuijingHei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Allow group write permissions on /usr/ because in upstream project's
CI we want to overwrite software for testing. The directories
are typically owned by root:root and CI runs in openshift as a user
that is a member of the `root` (GID: 0) group.
See coreos/coreos-installer#1716

Also add an exception for /etc/grub.d for OSTree upstream CI.
@dustymabe
Copy link
Member Author

ok. I think I've covered all the corner cases now and tested in coreos/coreos-installer#1716 and ostreedev/ostree#3562

@dustymabe dustymabe enabled auto-merge (rebase) January 16, 2026 04:22
@HuijingHei
Copy link
Member

/retest

@dustymabe
Copy link
Member Author

dustymabe commented Jan 16, 2026 via email

@openshift-ci
Copy link

openshift-ci bot commented Jan 16, 2026

@dustymabe: Overrode contexts on behalf of dustymabe: ci/prow/rhcos

Details

In response to this:

The RHCOs ci failures look unrelated to this change.

/override ci/prow/rhcos

On Fri, Jan 16, 2026, at 03:33, openshift-ci[bot] wrote:

openshift-ci[bot] left a comment (#4410) #4410 (comment)
@dustymabe https://github.com/dustymabe: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/rhcos 59fb249 link https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/coreos_coreos-assembler/4410/pull-ci-coreos-coreos-assembler-main-rhcos/2012074700108206080 true /test rhcos
Full PR test history https://prow.ci.openshift.org/pr-history?org=coreos&repo=coreos-assembler&pr=4410. Your PR dashboard https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:dustymabe.

Details
Instructions for interacting with me using PR comments are available here https://git.k8s.io/community/contributors/guide/pull-requests.md. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue: repository. I understand the commands that are listed here https://go.k8s.io/bot-commands.


Reply to this email directly, view it on GitHub #4410 (comment), or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCR63QAZLVY3TNWSURD2WD4HCO6VAVCNFSM6AAAAACRGEVGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTONJYG43DKMJWG4.
You are receiving this because you were mentioned.Message ID: @.***>

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@dustymabe dustymabe merged commit 17b3f52 into coreos:main Jan 16, 2026
6 checks passed
@dustymabe dustymabe deleted the dusty-open-perms branch January 16, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants